package com.enjoyor.health.HGPT.core.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.enjoyor.health.HGPT.core.dto.ReportDataRobotDetailDto;
import com.enjoyor.health.HGPT.core.dto.RobotKnowledgeBaseDto;
import com.enjoyor.health.HGPT.core.entity.ReportDataRobot;
import com.enjoyor.health.HGPT.core.mapper.ReportDataRobotMapper;
import com.enjoyor.health.HGPT.core.service.IReportDataRobotService;
import com.google.common.collect.Maps;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author enjoyor
 * @since 2023-11-01
 */
@Service
public class ReportDataRobotServiceImpl extends ServiceImpl<ReportDataRobotMapper, ReportDataRobot> implements IReportDataRobotService {
    @Override
    public List<RobotKnowledgeBaseDto> getRobotKnowledgeBaseDtoDtoByReportId(String reportId) {
        Map<String, Object> map = Maps.newHashMap();
        map.put("report_id", reportId);
        return baseMapper.getRobotKnowledgeBaseDtoByReportId(map);
    }

    @Override
    public List<ReportDataRobotDetailDto> getReportDataRobotDetailDtoDtoByReportId(String reportId, String partNameEn) {
        Map<String, Object> map = Maps.newHashMap();
        map.put("report_id", reportId);
        map.put("part_name_en", partNameEn);
        return baseMapper.getReportDataRobotDetailDtoDtoByReportId(map);
    }
}
